
package com.horizon.mobile.view;

import zuo.biao.library.base.BaseModel;
import zuo.biao.library.base.BaseView;
import zuo.biao.library.ui.WebViewActivity;
import zuo.biao.library.util.Log;
import zuo.biao.library.util.StringUtil;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

import com.horizon.mobile.R;
import com.horizon.mobile.model.Agent;
import com.horizon.mobile.model.Todo;
import com.horizon.mobile.model.User;

/**
 * 代办历史记录详情javaView
 * 
 * @author 左大明
 */
public class AgentDetailView extends BaseView<Agent> implements OnClickListener {
	private static final String TAG = "AgentDetailView";

	public AgentDetailView(Activity context, Resources resources) {
		super(context, resources);
	}

	public TextView tvFlowName;

	public TextView tvType;
	public TextView tvAgentPersion;

	@SuppressLint("InflateParams")
	@Override
	public View createView(LayoutInflater inflater) {
		convertView = inflater.inflate(R.layout.agent_view, null);
		tvFlowName = findViewById(R.id.tvFlowname, this);
		tvType = findViewById(R.id.tvType, this);
		tvAgentPersion = findViewById(R.id.tvAgentPersion, this);
		return convertView;
	}

	@Override
	public void bindView(Agent data) {
		if (data == null) {
			Log.e(TAG, "bindView data == null >> data = new User(); ");
			data = new Agent();
		}
		this.data = data;

		tvFlowName.setText(StringUtil.getTrimedString(data.getFlowName()));
		tvType.setText(StringUtil.getNoBlankString(data.getTitle()));
		tvAgentPersion.setText(data.getSaveTime());
	}

	@Override
	public void onClick(View v) {
		if (BaseModel.isCorrect(data) == false) {
			return;
		}
		switch (v.getId()) {
		}
	}
}